package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.Program;
import com.ruoyi.system.mapper.ProgramMapper;
import com.ruoyi.system.service.ProgramService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProgramServiceImpl implements ProgramService {
    @Autowired
    ProgramMapper programMapper;
    @Override
    public List<Program> selectList(Program program) {
        return programMapper.selectList(program);
    }

    @Override
    public List<Program> selectByIds(List<Long> ids) {
        return programMapper.selectByIds(ids);
    }

    @Override
    public Program selectById(Long id) {
        return programMapper.selectById(id);
    }

    @Override
    public Boolean create(Program program) {
        return null;
    }

    @Override
    public Boolean update(Program program) {
        return null;
    }

    @Override
    public Boolean deleteById(Long id) {
        return programMapper.deleteById(id) == 1;
    }

    @Override
    public Boolean updateProgramPlan(Program program) {
        return programMapper.update(program) == 1;
    }

    @Override
    public Boolean createProgramPlan(Program program) {
        return programMapper.insert(program) == 1;
    }

    @Override
    public List<Program> selectAll(Program program) {
        return  programMapper.selectAll(program);
    }

    @Override
    public List<Program> selectProgramList(Program program) {
        return programMapper.selectList(program);
    }
}
